package com.lut.builder.demo2;

/**
 * @author liuning
 * @ProjectName GOF23
 * @time 2021/12/20 20:20
 */
public class Worker extends Builder{

    private Product product;

    public Worker(){
        product = new Product();
    }
    @Override
    Builder buildA(String msg) {
        product.setBuildA(msg);
        return this;
    }

    @Override
    Builder buildB(String msg) {
        product.setBuildB(msg);
        return this;
    }

    @Override
    Builder buildC(String msg) {
        product.setBuildC(msg);
        return this;
    }

    @Override
    Builder buildD(String msg) {
        product.setBuildD(msg);
        return this;
    }

    @Override
    Product getProduct() {
        return product;
    }
}
